<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>市政类别--新增单体</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta http-equiv="Expires" CONTENT="0">
    <meta http-equiv="Cache-Control" content="no-siteapp,no-transform,no-store, no-cache, must-revalidate">
    <meta http-equiv="Pragma" content="no-cache">
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/>
    <link rel="stylesheet" href="/static/css/font.css">
    <link rel="stylesheet" href="/static/css/weadmin.css">
    <script type="text/javascript" src="/lib/layui/layui.js" charset="utf-8"></script>
    <link rel="stylesheet" href="/static/css/buildUnit/common.css">
</head>
<form id="form" class="layui-form layui-form-pane" action="" lay-filter="example">
    <div class="layui-colla-content layui-show">
        <table class="layui-table v-table">
            <!--<colgroup>
                <col width="16%">
                <col width="13%">
                <col width="13%">
                <col width="16%">
                <col width="15%">
                <col width="15%">
            </colgroup>-->
            <tbody>
            <tr>
                <td class="th8">单体名称</td>
                <td colspan="5">
                    <input type="hidden" name="singleId" class="formData">
                    <input name="singlePrjName" type="text" lay-verify="isEmpty" class="layui-input formData"
                           placeholder="单体名称">
                </td>
            </tr>
            <tr>
                <td class="th8">单体规模</td>
                <td colspan="5">
                    <input type="text" name="singleScale" lay-verify="isEmpty" class="layui-input formData" placeholder="单体规模">
                </td>
            </tr>
            <tr>
                <td class="th8">单体长度(m)</td>
                <td colspan="5">
                    <input name="singleLength" type="number" lay-verify="isEmpty" class="layui-input formData"
                           placeholder="单体长度">
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <button lay-submit lay-filter="submit" style="display: none;" id="submit" class="demo1">提交</button>
</form>
<body>
<script src="/static/js/main.js"></script>
<script type="text/javascript">
    var $;
    layui.use(['jquery', 'form', 'configure', 'configureCom', 'bluebird', 'replaceStr', 'jsDictFile', 'mapExtend'], function () {
        var form = layui.form;
        var configure = layui.configure;
        var configureCom = layui.configureCom;
        var table = layui.table;
        var sessionFun = layui.sessionFun;//缓存
        $ = layui.jquery;

        var singleprojectData = sessionFun.get(configure.SESSION_SINGLE_PROJECT_DATA);
        if (singleprojectData) {
            form.val('example', singleprojectData);
        }

        //监听submit提交
        form.on('submit(submit)', function (data) {
            return false;
        });
    });

    function getData() {
        return new Promise(function (res, rej) {
            var data = {};
            if (!window.formVerifyFun()) {
                return false;
            }
            $('.formData').each(function (index, item) {
                var key = $(item).attr('name');
                data[key] = $(item).val();
            });
            res({result: data});
        });
    }

</script>
</body>
</html>